import { Loading } from "element-ui";

let loadingInstance = null; // 全局 loading 实例
const loadingOptions = { fullscreen: true };

/** 展示loading遮罩 */
export const showLoading = () => {
  loadingInstance = Loading.service(loadingOptions);
};
/** 关闭 loading 遮罩 */
export const closeLoading = () => loadingInstance && loadingInstance.close();
